import Vue from 'vue'
//引入路由组件
import VueRouter from 'vue-router'
//加载路由组件
Vue.use(VueRouter)
//导入当前配置
export default new VueRouter({
    routes: [
        {
            name: "TestModel",
            path: "/test",
            component: (resolve, reject) => import("@/components/TestModel")
        },
        {
            name: "UserList",
            path: "/userlist",
            component: (resolve, reject) => import("@/components/UserList")
        },
        {
            name: "UserAdd",
            path: "/useradd",
            component: (resolve, reject) => import("@/components/UserAdd")
        },
        {
            name: "UserEdit",
            path: "/useredit/:id",
            component: (resolve, reject) => import("@/components/UserEdit")
        },
    ]
})